Apparatus for detecting throttle opening of an engine

ABSTRACT

An apparatus for detecting the degree of opening of a throttle valve of an engine. A first value indicating the degree of opening of the throttle valve and a second value indicating the opening of the throttle valve in an idling position are detected and stored. Whether the first value is kept unchanged for a fixed interval is decided when the throttle valve is in an idling position. A stable value of the first values is provided when the first value is kept unchanged for a fixed interval and the throttle valve is in an idling position. Then the second value is updated to the stable value. A value indicating the difference between the stored first and second values is calculated. The calculated value is used to control the amount of fuel supplied to the engine.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an apparatus for detecting the degreeof throttle opening of an engine and which is capable of detecting thedegree of opening of a throttle valve when an engine is idling ("theidling position").

2. Prior Art

It is known that an amount of fuel supplied, ignition timing, an amountof air bypassed and so on are controlled on the basis of a detection ofthe degree of opening of a throttle of an engine. For example, when anintake air sensor fails to function properly, an output of such a sensoris switched to a false signal calculated on the basic of a throttleopening signal corresponding to the degree of opening of a throttlevalve, and a rotational frequency signal corresponding to the rotationalfrequency of an engine, and this false signal is used to calculate anecessary amount of fuel to be supplied by a well known calculatingproceduce (cf. Japanese Patent Public Disclosure No. 13503/87).

By using a signal made with reference to an idling position (the zeroposition) of an engine as a throttle opening signal for controlling anamount of fuel supplied, ignition timing, an amount of air bypassed andso on, it may be possible to absorb the offset of a signal correspondingto the degree of opening of a throttle determined by the amount ofintake air at the idling state, and to achieve optimum control with ahigh degree of accuracy.

A potentiometer is usually used for outputting an electrical signalcorresponding to a throttle valve position as a detector which outputs asignal corresponding to an amount of throttle opening. Such apotentiometer operates to divide a voltage applied across thepotentiometer and output a voltage corresponding to various positionsfrom the idling position to the fully opened position. Conventionally,in order to accomplish optimum control with a high degree of accuracy,the position of such a detector is adjusted during a manufacturingprocess so that the detector may output a predetermined referencevoltage. A throttle opening detector outputs the difference between anoutput signal of the detector and the predetermined reference voltage asa signal indicating an amount of throttle opening. On the basis of suchamount of throttle opening, a control unit operates to control theamount of fuel suppliesd, ignition timing, the amount of air bypassed,and so on.

Since a conventional apparatus for detecting the amount of throttleopening of an engine is consituted as described above, the degree ofcontrol precision decreases in a case where positional deviation occursduring manufacture of a car, where a position at which a detector ismounted deviates due to prolonged usage of the detector, or where anidling position is changed in order to adjust the number of enginerotations when idling. For example, in the case of controlling an amountof fuel supplied, an output voltage of a detector at the throttle valveposition during operation becomes lower than a normal value when theoutput voltage of the detector at an idling position becomes lower thana reference voltage. Accordingly, the amount of fuel supplied isreduced, the air/fuel ratio becomes lean and idling stability and thedrivability deteriorates.

SUMMARY OF THE INVENTION

It is an object of the invention to provide an apparatus for detectingthe degree of opening of a throttle valve and which is capable ofoutputting an exact throttle opening signal with reference to the idlingposition (the zero position) even when a voltage output from a sensorindicating an idling position is changed due to a change in the idlingposition and dispersion in the adjustment of sensors.

In order to achieve the above-described object, the present inventionprovides an apparatus for detecting the degree of opening of a throttlevalve of an engine, comprising:

means coupled to the throttle valve for providing a first signalindicating the degree of opening of the throttle valve;

means for detecting the degree of opening of the throttle valve duringidling so as to provide a second signal indicating such a state; and

means for calculating a value indicating the difference between thefirst and second signals, whereby the calculated value is used tocontrol an amount of fuel supplied to the engine.

The first embodiment of an apparatus for detecting the degree of openingof a throttle valve of an engine according to the present inventioncomprises:

a first storing means for storing a first value indicating the degree ofopening of the throttle valve;

a second storing means for storing a second value indicating the degreeof opening of the throttle valve during idling;

means for deciding whether the throttle valve is in an idling position;

means for deciding whether the first value is kept unchanged for a fixedinterval when it has been decided that the throttle valve is in anidling position;

means for providing a stable value of the first value when it is decidedthat the first value is kept unchanged for a fixed interval and that thethrottle valve is in an idling position;

means for causing the second storing means to update the second value tothe stable value; and

means for calculating a value indicating the difference between thecontents of the first and second storing means, whereby the calculatedvalue is used to control an amount of fuel supplied to the engine.

The second embodiment of an apparatus for detecting the degree ofopening of a throttle value of an engine according to the presentinvention includes in addition to the construction of the firstembodiment:

means for detecting and providing the minimum value of the stable valuesdetected during the period in which the throttle valve is in idlingposition;

means for detecting whether the minimum value of the stable values iskept unchanged for a fixed interval when the throttle valve is not in anidling position; and

means for causing the second storing means to update the second value tothe minimum value of the stable values when it is decided that theminimum value of the stable values is kept unchanged for the fixedinterval when the throttle valve is not in an idling position.

The second embodiment of the present invention may further comprise:

means for deciding whether the lower limit of the first value is lowerthan the second value; and

means for causing the second storing means to update the second value tothe lower limit of the first value.

The second embodiment of the present invention may still furthercomprise:

means for detecting and providing the minimum value of the first valuesduring the period in which the throttle valve is in an idling position;

means for deciding whether the minimum value of the stable values iskept equal to the minimum value of the first value for a fixed interval;and

means for causing the second storing means to update the second value tothe minimum value of the stable values when it is decided that theminimum value of the stable values is kept equal to the minimum value ofthe first values for the fixed interval.

In accordance with the third embodiment of the present invention, meansfor deciding whether the first value is kept within a predeterminedrange for a fixed interval when the throttle valve is in an idlingposition is incorporated into the construction of the second embodiment.This enables the means for providing a stable value to provide the lowerlimit of the first value and the second storing means to be updated tosuch a lower limit when it is decided that the first value is keptwithin the predetermined range for the fixed interval when the throttlevalve is in an idling position.

The third embodiment of the present invention may further comprise:

means for detecting and providing the minimum value of the stable valuesdetected during the period in which the throttle valve is in an idlingposition;

means for deciding whether the minimum value of the stable values iskept unchanged for a fixed interval when the throttle valve is not in anidling position; and

means for causing the second storing means to update the second value tothe minimum value of the stable values when it is decided that theminimum value of the stable values is kept unchanged for the fixedinterval when the throttle valve is not in and idling position.

The third embodiment of the present invention may still furthercomprise:

means for deciding whether the lower limit of the first value is lowerthan the second value; and

means for causing the second storing means to update the second value tothe lower limit of the first value.

The fourth embodiment of the present invention comprises in addition tothe construction of the third embodiment:

means for detecting and providing the minimum value of the first valuesduring the period in which the throttle valve is in an idling position;

means for deciding whether the minimum value of the stable values iskept equal to the minimum value of the first values for a fixedinterval; and

means for causing the second storing means to update the second value tothe minimum value of the stable values when it is decided that theminimum value of the stable values is kept equal to the minimum value ofthe first values for the fixed interval.

The above and other features, objects and advantages of the inventionwill become clearer from the following description taken in connectionwith the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows an engine electrically controlled by anapparatus for detecting the degree of opening of a throttle valveaccording to the present invention;

FIG. 2 is a block diagram showing an example of the structure of acontrol unit of FIG. 1;

FIG. 3 shows a flowchart of the operations for controlling an amount offuel supplied to the engine;

FIG. 4 is a graph showing a two-dimensional map stored in a ROM shown inFIG. 2 for obtaining a false signal f (Ne,θ);

FIG. 5 shows a flowchart of the operations for detecting an idlingposition reference-throttle opening value in accordance with the firstembodiment of the present invention;

FIG. 6 shows a flowchart of the operations for detecting an idlingposition reference-throttle opening value in accordance with the seondembodiment of the present invention;

FIG. 7 shows a relation between an output voltage of a throttle openingsensor and A/D converted value thereof in the second embodiment;

FIG. 8 shows a flowchart of the operations for detecting an idlingposition reference-throttle opening value in accordance with the thirdembodiment of the present invention;

FIG. 9 shows a graph used for explaining the operation of the thirdembodiment;

FIG. 10 shows a flowchart of the operations for detecting an idlingposition reference-throttle opening value in accordance with the fourthembodiment of the present invention; and

FIG. 11 shows a graph used for explaining the operation of the fourthembodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 schematically shows an engine electrically controlled by anapparatus for detecting the degree of throttle opening according to thepresent invention. In this figure, an engine 1 mounted in an automobileintakes air through an intake pipe 2 and a throttle valve 3 from an aircleaner 4. At the time of ignition, an igniter 5 is turned from a ON toOFF position by a signal from a signal generator (not shown) in adistributor. When the igniter 5 is turned off, a high voltage ignitionsignal is generated at a secondary winding of an ignition coil 6 andsupplied to a spark plug (not shown). In synchronism with the occurrenceof this ignition signal, fuel is injected from an injector 7 to theintake pipe 2 located upstream of the throttle valve 3, and the injectedfuel is taken into the engine 1 by the above-described intake operation.An exhaust gas produced after the fuel combusted is discharged throughan exhaust manifold 8 and a three-way catalytic converter 8A to theatmosphere.

The pressure in the intake pipe 2 downstream of the throttle valve 3 isdetected as the absolute pressure by a pressure sensor 9. An analogpressure detection signal proportional to the detected absolutepressure, an analog throttle opening signal proportional to the degreeof throttle opening detected by a throttle sensor 10 and an ignitionsignal generated at a primary winding of the ignition coil 6 aresupplied to a control unit 11.

The control unit 11 receives electric power from a battery 12 when a keyswitch 13 is turned ON, performs the operations of the routine shown inFIG. 3 (explained later) and calculates the amount of fuel to beinjected in accordance with a driving state of the engine 1 in order tocontrol the degree of opening of a valve of the injector 7.

FIG. 2 is block diagram showing an example of the structure of thecontrol unit 11. In the figure, the control unit 11 has a microcomputer100 which comprises a CPU 200, a counter 201 for measuring an ignitionsignal period, a timer 202, an A/D converter 203, a non-volatile RAM 204operating as a work memory for storing various values such as the degreeof throttle opening in an idling position, a ROM 205 for storingprograms explained later with reference to FIG. 3, an output port 206and a bus 207.

An ignition signal generated at the primary winding of the ignition coil6 is shaped by an input interface circuit 101 and fed to themicrocomputer 100 as an interrupt input. At the time of suchinterruption, an ignition signal period measured by the counter 201 isread out and stored in the RAM 204 for detecting the number of enginerotations. Output signals of the pressure sensor 9 and the throttleopening sensor 10 are formed by a second input interface circuit 102which serves to eliminate noise from these output signals. The shapedand noise-free signals are A/D converted in sequence by the A/Dconverter 203. An amount of injected fuel is calculated as the length oftime when the injector 7 is open in accordance of the state of drivenengine and set to timer 202. During the period when the timer 202operates, the output port 206 outputs a voltage of a predeterminedlevel. This voltage is converted to an electric current value by anoutput interface 103 and serves to open the valve of the injector 7which causes fuel to be supplied from the injector 7.

The microcomputer 100 receives electric power from a first power supply104 to which the battery 12 is connected through the key switch 13. Asecond power supply 105 is connected to the battery 12 at all times toserve as a backup power supply for inhibiting the content of the RAM 204from being erased.

An operation of the CPU 200 according to the present invention will nextbe explained with reference to a flowchart shown in FIG. 3. In step S1,a value Ne indicating a rotational frequency of the engine is calculatedfrom a measured period of the ignition signal from the ignition coil 6,and stored in the RAM 204. In step S2, an analog output signal of thepressure sensor 9 is A/D converted by the A/D converter 203 and storedin the RAM 204 as an intake pipe pressure value Pb which indicates adigital value obtained by A/D converting an intake pipe pressure. Instep S3, a signal output from the throttle opening sensor 10 is A/Dconverted by the A/D converter 203 to a throttle opening value θ_(ADC)which indicates a digital value obtained by A/D converting the degree ofthrottle opening correspondingly. In step S4, a process of detecting athrottle opening value with reference to an idling position ("idlingposition reference-throttle opening value") θ is effected as shown indetail in FIGS. 5, 6, 8 and 10.

Next, in step S5 a decision is made as to whether the pressure sensor 9is operating normally, that is, whether intake pipe pressure value Pb iswithin a predetermined normal range (Pb_(min)≦ Pb≦Pb_(max)). If thepressure sensor 9 is operating normally, intake pipe pressure value Pbis stored in the RAM 204 as a pressure value for operation Pb' in stepS6. If step S5 decides that intake pipe pressure value Pb is outside thepredetermined range and is abnormal, the program proceeds to step S7. Instep S7, a false signal f(Ne,θ) is calculated as a false pressure valueof an intake pipe pressure using rotational frequency Ne and idlingposition reference-throttle opening value θ, and stored in the RAM 204as a pressure value for operation Pb'.

False signals f(Ne,θ) have been obtained from experiments as intake pipepressure values sent from the pressure sensor 9 in accordance withrotational frequency values Ne and idling position reference-throttleopening values θ, and have been stored in the ROM 205 as atwo-dimensional map as shown in FIG. 4.

In step S8, a volumetric efficiency C_(EV) (Ne,Pb') is calculatee fromrotational frequency Ne and pressure value for operation Pb'. C_(EV)(Ne,Pb') has been experimentally obtained in correspondence to Ne andPb' for predetermined air/fuel ratios in the form of a two-dimensionalmap stored in the ROM 205. In step S9, a pulse width T_(PW) iscalculated as an amount of fuel injected in accordance with thefollowing equation:

    T.sub.PW =K×Pb'×C.sub.EV

where K is a constant. The calculated T_(PW) is stored in the RAM 204.Then the program returns to step S1 and repeats the steps describedabove. The calculated T_(PW) is set in the timer 202 in synchronism withthe occurrence of an ignition signal and causes the timer 202 to operatefor the duration of T_(PW).

The present invention relates to operations performed in the step S4shown in FIG. 3 for detecting idling position reference-throttle openingθ. The first embodiment of the present invention will be explained withreference to FIG. 5. In this figure, a decision is made in step S10 asto whether throttle opening value θ_(ADC) is equal to or smaller than apredetermined value θ_(max) which is taken as the upper limit of thethrottle opening value θADC when the throttle valve is in an idlingposition taking into consideration a deviation in the mounting positionof the throttle opening sensor 10 and the idling position. θ_(max) hasbeen stored in the ROM 205 beforehand.

If θ_(ADC) ≦θ_(max') indicating that there is the possibility of thethrottle valve 4 being in an idling position, the program proceeds tostep S11 where a decision is made as to whether throttle opening valueθ_(ADC) is equal to a stable value θ_(STB). If θ_(ADC) is unequal toθ_(STB), the timer TM is set to thirty (corresponding to three seconds)in step S12. In step S13, θ_(STB) is updated to the current throttleopening value.

If θ_(ADC) =θ_(STB) in step S11, a decision is made in step S14 as towhether the current point of time coincides with any one of timingspreset at an interval of 100 miliseconds. If NO, the program jumps tostep S16. On the other hand, if YES, the timer TM is decremented by onein step S15 if TM is unequal to zero. However, if the timer TM is equalto zero, nothing is done in step S15.

As a result of operations in S11-S15, if no change in throttle openingvalue θ_(ADC) has been found more than thirty consecutive times, thatis, for more than three consecutive seconds, the timer TM becomes equalto zero and throttle opening value θ_(ADC) at this time is set to stablevalue θ_(STB) and stored in the RAM 204. In step S16, a decision is madeas to whether the timer TM is equal to zero. If YES, indicating thatthrottle opening value θ_(ADC) has not changed more than three seconds,a throttle opening value in an idling position ("idling positionthrottle opening value") θ_(IDL) is updated to stable value θ_(STB) instep S17. After the operation in step S17 has been completed, when thetimer TM is not equal to zero in step S16 and when θADC >θ_(max) in stepS10, idling position reference-throttle opening value θis updated instep S18 to a value equal to (θ_(ADC) -θIDL).

FIG. 6 shows the second embodiment of the operation performed in thestep S4 in accordance with the present invention. This embodiment isdifferent from the first one in that step S20 is executed instead ofstep S11, and therefore explanation of the remaining steps is omittedhere. When it is decided in step S10 that θ_(ADC) is equal to or smallerthan θ_(max), a decision is made in step S20 as to whether throttleopening value θ_(ADC) is equal to or larger than stable value θ_(STB)but equal to or smaller than θ_(STB) +1 bits. If θ_(ADC) is outside thisrange, steps S12 and S13 are executed. If θ_(ADC) within the range,steps S14 and S15 are executed.

As a result of the operations in steps S20 and S12-S15, if it is decidedthat the change in throttle opening value θ_(ADC) is within ##STR1## formore than three consecutive seconds, the timer TM becomes equal to zeroand the lower limit of θ_(ADC) is stored as a stable value θ_(STB) .Accordingly, if it is decided that the timer TM is equal to zero in stepS16, idling position throttle opening value θ_(IDL) is updated to theabove-described θSTB in step S17. After the completion of step S17, ifit is decided in step S10 that θ_(ADC) >θ_(max) and if it is decided instep S16 that the timer TM is unequal to zero, idling positionreference-throttle opening value θ is updated to (θ_(ADC) -θ_(IDL)) instep S18.

In the operation performed in the second embodiment, an output voltageVa of the throttle opening sensor 10 when the throttle valve is in anidling position is, as shown in FIG. 7, in the vicinity of a boundary ofthe corresponding A/D converted value output from the A/D converter 203.Accordingly, even if A/D converted throttle opening value θ_(ADC) varieswithin the range of ##STR2## due to noise and voltage fluctuation in theelectricity supply, it is still possible to detect an idling position ofthe throttle valve.

FIG. 8 shows the third embodiment of the step S4 (FIG. 3) according tothe present invention. In the third embodiment, steps S30-S32 andS40-S47 are incorporated into the steps of the second embodiment shownin FIG. 6. In FIG. 8, operations similar to those in FIG. 6 aredesignated by the same reference symbols and explanation thereof isomitted here. When it is decided in step S10 that throttle opening valueθ_(ADC) does not exceed predetermined value θ_(max), stable valueθ_(STB) is obtained in steps S20 and S12-S15 and it is decided in stepS16 that the timer TM is equal to zero, a decision is made in step S30as to whether stable value θ_(STB) already obtained is smaller thanidling position throttle opening value θ_(IDL). If NO, the program jumpsto step S31, and if YES, θ_(IDL) is updated to stable value θ_(STB) instep S17.

In step S31, a decision is made as to whether stable value θ_(STB) issmaller than a minimum stability value θ_(LOW) which is the lowest ofthe stable values. If NO, the program jumps to step S18. If YES, θ_(LOW)is updated to θ_(STB) in step S32. Since minimum stability value θ_(LOW)has been set to the maximum value 255 in step S47 (explained later) whenthrottle opening value θ_(ADC) is larger than predetermined valueθ_(max), minimum stability value θ_(LOW) is the minimum value of θ_(STB)during the period in which throttle opening value θ_(ADC) iscontinuously equal to or smaller than predetermined value θ_(max).

In step S10, if it is decided that throttle opening value θ_(ADC) islarger than perdetermined value θ_(max), a decision is made in step S40as to whether minimum stability value θ_(LOW) is equal to 255. If YES,the program jumps to step S18. If NO, indicating that θ_(LOW) has beenupdated during the period when θ_(ADC) is smaller than θ_(Max) and thatsteps S41-S46 explained later have not yet been executed, in step S41, adecision is made as to whether the minimum stability value at thepresent time is equal to that at the preceeding time θ_(LOWP). If NO, acounter CNT is set to three in step S42 and θ_(LOWP) is updated to θLOWin step S43. If YES, the counter CNT is decremented by one in step S44if the counter CNT is not equal to zero. If the counter CNT is equal tozero, nothing is done in step S44.

As a result of the operations in steps S41-S44, if a decision that theminimum stability value at the present time is equal to that at thepreceeding time is made more than three consecutive times, the counterCNT becomes equal to zero and the minimum stability value at this timeis stored in the RAM 204 in place of the minimum stability value at thepreceeding time. Then, in step S45, a decision is made as to whether thecounter CNT is equal to zero. If NO, the program jumps to step S47. IfYES, indicating that the decision that the minimum stability value atthe present time is equal to that at the preceeding time is made morethan three consecutive times, idling position throttle opening valueθ_(IDL) is updated to θ_(LOWP) in step S46. Next, in step S47, minimumstability value θ_(LOW) is set to the maximum value 255 for thepreparation of the next detection of the minimum stability values andfor indicating that the operations in steps S40-S46 have been completed.

After the completion of the operation of step S47, if it is decided instep S40 that θ_(LOW) is equal to 255, if it is decided in step S16 thatthe timer TM is not equal to zero, and if it is decided in step S31 thatθ_(STB) ≧θ_(LOW), and after the completion of the operation in step S32,idling position reference-throttle opening value θ is updated to(θ_(ADC) -θ_(IDL)) in step S18.

FIG. 9 shows a time chart for explaining the operation of the controlunit in accordance with the third embodiment described above. In thisfigure, the reference symbols TP1-TP5 designate throttle valve positionsin different times, throttle valve positions TP2-TP5 being the same butdifferent from throttle valve position TP1. Even if the throttle valve 3(FIG. 1) is kept slightly open and stabilized in that position, only ifthe throttle valve 3 assumes the same slightly opened position fourconsecutive times as designated by TP2-TP5 in FIG. 9, does counter CNTbecome equal to zero and the idling position throttle opening valueθ_(IDL) be updated. Accordingly, it is possible to significantly reducethe possibility of an error occurring in detecting an idling position ofthe throttle valve.

The further embodiment of the step S4 according to the present inventionwill now be explained with reference to FIG. 10. As seen from thisfigure, now steps S50-S53 are added to the steps of the thirdembodiment, and therefore explanation will focus on the operation ofthese new steps.

If it is decided in step S10 that throttle opening value θ_(ADC) doesnot exceed predetermined value θ_(max), stable value θSTB is obtained insteps S20 and S12-S15. If it is decided in step S16 that the timer TM isequal to zero, idling position throttle opening value θ_(IDL) is updatedto stable value θ_(STB) in step S17 if it is decided in step S30 thatθ_(STB) is smaller than θ_(IDL). Then, minimum stability value θ_(LOW)is obtained in steps S31 and S32.

After those operations have been completed, a dicision is made in stepS50 as to whether throttle opening value θ_(ADC) is smaller than theminimum of the throttle opening values ("minimum throttle openingvalue") θ_(min). If θ_(ADC) <θ_(MIN), θ_(MIN) is updated to θ_(ADC) instep S51. Since minimum throttle opening value θ_(MIN) is set to 255 instep S53 (explained later), if θ_(ADC) >θ_(max), minimum throttleopening value θ_(MIN) is the minimum value of throttle opening valuesduring the period in which throttle opening value θ_(ADC) is kept equalto or smaller than predetermined value θ_(max).

If it is decided in step S10 that throttle opening value θ_(ADC) islarger than predetermined value θ_(max), a decision is made in step S40as to whether minimum stability value θ_(LOW) is equal to 255. If NO, adecision is made in step S52 as to whether minimum stability valueθ_(LOW) is equal to minimum throttle opening value θ_(MIN). If YES, thisindicates that θ_(LOW) is the real minimum stability value during theperiod in which throttle opening value θ_(ADC) does not exceedpredetermined value θ_(max). Accordingly, θ_(LOW) is stored as the realminimum stability value, the operations in steps S41-S47 are executed toupdate idling position throttle opening value θ_(IDL) to θ_(LOWP) and,finally, minimum throttle opening value θ_(MIN) is set to the maximumvalue 255 for the preparation of the next detection of the minimumthrottle opening value.

After the completion of the operation of step S53, if θ_(LOW) is unequalto θ_(MIN) in step S52, if θ_(LOW) is unequal to 255 in step S40, if itis decided in step S50 that θ_(ADC) ≧θ_(MIN) and after the completion ofthe operation of step S51, idling position reference-throttle openingvalue θ is updated to (θ_(ADC) -θ_(IDL)) in step S18.

FIG. 11 shows a time chart for explaining the operation performed in thesteps of the fourth embodiment. Similar to the operation of the thirdembodiment, the counter CNT becomes equal to zero and idling positionthrottle opening value θ_(IDL) is updated only if the throttle valve 3assumes the same opened position four consecutive times. Further, if thethrottle valve 3 is returned to the vicinity of an idling position and,immediately after that, is opened slightly and kept in this position,the minimum stability value is different from the minimum throttleopening value. Accordingly, it is possible that there is no necessity ofdetecting θ_(LOW) as one of the parameters for detecting an idlingposition, and, therefore, the possibility of erroneous detection of anidling position becomes lower than that in the third embodiment.

In summary, an apparatus for detecting the degree of opening of athrottle valve of an engine according to the first embodiment canprovide a throttle opening signal with reference to an idling position("zero position") which has been determined and stored as the positionof the throttle valve detected when a signal corresponding to the degreeof throttle opening is lower than a predetermined value indicating theupper limit of dispersion in an idling position, and is kept unchangedfor a fixed interval.

An apparatus for detecting the degree of opening of a throttle valve ofan engine according to the second embodiment enables the detection of anidling position by determining that the lower limit of a signalcorresponding to the degree of throttle opening indicates an idlingposition of the throttle valves when a voltage level of theabove-described signal is in the vicinity of the boundary of a digitalsignal to which the above-described signal is converted by the A/Dconverter 203, and when the digital signal changes within a range of##STR3## due to noise and fluctuation in the power supply.

An apparatus for detecting the degree of opening of a throttle valve ofan engine according to the third embodiment can modify a signalindicating an idling position of the throttle valve in the direction ofmore opened throttle valve and store a signal corresponding to themodified idling position only if the coincidence of the minimum valuesof signals corresponding to the throttle opening (the "minimum stabilityvalues") at the current time and the preceeding time is foundconsecutively at predetermined times when the above-described signalsare lower than the above-described predetermined value and are keptunchanged for a fixed interval. This makes it possible to reduce thepossibility of erroneous detection, as an idling position, a throttlevalve position detected when the signal indicating the degree ofthrottle opening which corresponds to the position of a slightly openedand stabilized throttle valve is lower than the above-describedpredetermined value.

In an apparatus for detecting the degree of opening of a throttle valveof an engine according to the fourth embodiment, the minimum value ofsignals corresponds to the degree of throttle opening is detected whenthese signals are under the predetermined value described above. If thisminimum value is unequal to the minimum stability value described above,the minimum stability value can be omitted from the parameters fordetecting an idling position because the minimum stability value doesnot indicate an idling position. This makes it possible to furtherreduce the possibility of erroneous detection of an idling position.

The invention has been described in detail with particular reference tocertain embodiments thereof, but it will be understood that variationsand modifications can be effected within the spirit and scope of theinvention. For example, a switch which is turned ON or OFF when throttleopening value θ_(ADC) does not exceed predetermined value θ_(max) may beprovided in a throttle sensor. On the basis of whether this switch is atthe ON state or OFF state, a decision can be made as to whether θ_(ADC)does not exceeds θ_(max).

It should be noted that steps S30-S32 and S40-S47 executed in the thirdembodiment can be incorporated into the corresponding portions of theflowchart shown in FIG. 5.

What is claimed is:
 1. A apparatus for detecting the degree of openingof a throttle valve of an engine, comprising:means coupled to thethrottle valve for providing a first signal indicating the degree ofopening of the throttle valve; means for detecting the degree of openingof the throttle valve during idling so as to provide a second signalindicating such a position; and means for calculating a value indicatingthe difference between the first and second signals, whereby thecalculated value is used to control an amount of fuel supplied to theengine.
 2. An apparatus for detecting the opening of a throttle valve ofan engine, comprising:a first storing means for storing a first valueindicating the degree of opening of the throttle valve; a second storingmeans for storing a second value indicating the degree of opening of thethrottle valve during idling; means for deciding whether the throttlevalve is in an idling position; means for deciding whether the firstvalue is kept unchanged for a fixed interval when it is decided that thethrottle valve is in an idling position; means for providing a stablevalue of the first value when it is decided that the first value is keptunchanged for the fixed internal and that the throttle valve is in anidling position; means for causing the second storing means to updatethe second value to the stable value; and means for calculating a valueindicating the difference between the contents of the first and secondstoring means, whereby the calculated value is used to control an amountof fuel supplied to the engine.
 3. An apparatus as set forth in claim 2further comprising:means for detecting and providing the minimum valueof the stable values detected during the period in which the throttlevalve is in an idling position; means for deciding whether the minimumvalue of the stable values is kept unchanged for a fixed interval whenthe throttle valve is not in an idling position; and means for causingthe second storing means to update the second value to the minimum valueof the stable values when it is decided that the minimum value of thestable values is kept unchanged for the fixed interval when the throttlevalve is not in an idling position.
 4. An apparatus as set forth inclaim 3 further comprising:means for deciding whether the lower limit ofthe first value is lower than the second value; and means for causingthe second storing means to update the second value to the lower limitof the first value.
 5. An apparatus as set forth in claim 4 furthercomprising:means for detecting and providing the minimum value of thefirst values during the period in which the throttle value is in anidling position; means for deciding whether the minimum value of thestable values is kept equal to the minimum value of the first value fora fixed interval; and means for causing the second storing means toupdate the second value to the minimum value of the stable values whenit is decided that the minimum value of the stable values is kept equalto the minimum value of the first values for the fixed interval.
 6. Anapparatus as set forth in claim 2 further comprising means for decidingwhether the first value is kept within a predetermined range for a fixedinterval when the throttle valve is in an idling position, andwhereinthe means for providing a stable value to provide the lower limit of thefirst value and the second storing means is updated to such a lowerlimit when it is decided that the first value is kept within thepredetermined range for the fixed interval when the throttle valve is inan idling position.
 7. An apparatus as set forth in claim 6 furthercomprising:means for detecting and providing the minimum value of thestable values detected during the period in which the throttle valve isin an idling position; means for deciding whether the minimum value ofthe stable values is kept unchanged for a fixed interval when thethrottle valve is not in an idling position; and means for causing thesecond storing means to update the second value to the minimum value ofthe stable values when it is decided that the minimum value of thestable values is kept unchanged for the fixed interval when the throttlevalve is not in an idling position.
 8. An apparatus as set forth inclaim 7 further comprising:means for deciding whether the lower limit ofthe first value is lower than the second value; and means for causingthe second storing means to update the second value to the lower limitof the first value.
 9. An apparatus as set forth in claim 8 furthercomprising:means for detecting and providing the minimum value of thefirst values during the period in which the throttle value is in anidling position; means for deciding whether the minimum value of thestable values is kept equal to the minimum value of the first values fora fixed interval; and means for causing the second storing means toupdate the second value to the minimum value of the stable values whenit is decided that the minimum value of the stable values is kept equalto the minimum value of the first values for the fixed interval.